package com.amat0urheu.dao;

import com.amat0urheu.pojo.OperationLog;
import com.amat0urheu.pojo.SystemLog;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author:amat0ur_ting
 * @create:2023-12-07 9:40
 */
@Mapper
public interface LogMapper {
    @Insert("insert into  mc_system_log values (null,#{operationLog.username},#{operationLog.action},#{operationLog.params},#{operationLog.operateTime})")
    void insertSysLog(@Param("operationLog")OperationLog operationLog);
    @Select("select * from mc_system_log order BY operateTime DESC")
    List<SystemLog> getAllSystemlogs();
    @Delete("delete from mc_system_log  where Id=#{id}")
    Integer removeSystemLog(Integer id);
    @Delete("delete from mc_system_log ")
    Integer removeAllSystemLog();
}
